import { instance } from "../utils/request";
const getDictionaryTypesPagination = async (page:number,limit:number,key?:string) => {
	return await instance.get("/DictionaryTypes/Pagination", {page,limit,key});
};

const addDictionaryTypes = async (data:RequestCreateDictionaryTypesDto) => {
	return await instance.post("/DictionaryTypes/Add", data);
};

const updateDictionaryTypes = async (data:RequestUpdateDictionaryTypesDto) => {
	return await instance.post("/DictionaryTypes/Update", data);
};

const getDictionaryTypesDetail = async (id:number) => {
	return await instance.get("/DictionaryTypes/Detail", { id  });
};

const deleteDictionaryTypes = async (data:RequestIdDictionaryTypesDto) => {
	return await instance.post("/DictionaryTypes/Delete", data);
};

const DictionaryTypesApi = {
	getDictionaryTypesPagination,
	addDictionaryTypes,
	updateDictionaryTypes,
	getDictionaryTypesDetail,
	deleteDictionaryTypes,
};

export default DictionaryTypesApi
